Skip to content

Comments

refactor: refactor sharded wal to handle coordinator#1237

Open
BioPhoton wants to merge 25 commits intomainfrom
feat/utils/handle-coordinator-in-sharded-wal
Open

refactor: refactor sharded wal to handle coordinator#1237
BioPhoton wants to merge 25 commits intomainfrom
feat/utils/handle-coordinator-in-sharded-wal

Conversation

@BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Feb 3, 2026

Precondition:

Related:

This PR includes:

  • split sharded wal logic
  • handle coordinator in sharder

Followup:

@nx-cloud
Copy link

nx-cloud bot commented Feb 3, 2026

View your CI Pipeline Execution ↗ for commit 674fe70

Command Status Duration Result
nx run-many --target=build --parallel=3 ✅ Succeeded 35s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-24 12:43:44 UTC

# Conflicts:
#	packages/utils/src/lib/wal.ts
#	packages/utils/src/lib/wal.unit.test.ts
…-sharded-wal' into feat/utils/handle-coordinator-in-sharded-wal
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 17, 2026

Open in StackBlitz

@code-pushup/ci

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/ci@1237

@code-pushup/cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/cli@1237

@code-pushup/core

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/core@1237

@code-pushup/create-cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/create-cli@1237

@code-pushup/models

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models@1237

@code-pushup/nx-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1237

@code-pushup/axe-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/axe-plugin@1237

@code-pushup/coverage-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/coverage-plugin@1237

@code-pushup/eslint-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/eslint-plugin@1237

@code-pushup/js-packages-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/js-packages-plugin@1237

@code-pushup/jsdocs-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/jsdocs-plugin@1237

@code-pushup/lighthouse-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/lighthouse-plugin@1237

@code-pushup/typescript-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/typescript-plugin@1237

@code-pushup/utils

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/utils@1237

commit: 674fe70

@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 069d350 with previous commit 4c80af5.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 33 🔴 36 ↑ +3.5
Documentation 🟡 53 🟡 53 ↑ +0.5
Code coverage 🟢 93 🟢 93 ↓ −0.1
Bug prevention 🟡 75 🟡 75 ↓ −0.1
Axe Accessibility 🟡 88 🟡 88 ↓ −0.1
Code style 🟢 100 🟢 100
Security 🔴 0 🔴 0
Updates 🟡 72 🟡 72
Type Safety 🟡 67 🟡 67
Miscellaneous 🟡 67 🟡 67
Accessibility 🟢 92 🟢 92
Best Practices 🟢 97 🟢 97
SEO 🟢 92 🟢 92
👍 2 groups improved, 👎 1 group regressed, 👍 9 audits improved, 👎 3 audits regressed, 15 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 33 🔴 36 ↑ +3.5
JSDocs coverage Documentation coverage 🟡 53 🟡 53 ↑ +0.5
Code coverage Code coverage metrics 🟢 93 🟢 93 ↓ −0.1

31 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Speed Index 🟥 7.0 s 🟥 6.4 s ↓ −9.1 %
Lighthouse First Contentful Paint 🟥 3.4 s 🟥 3.1 s ↓ −8.5 %
Lighthouse Total Blocking Time 🟥 2,750 ms 🟥 1,850 ms ↓ −32.7 %
JSDocs coverage Methods coverage 🟨 10 undocumented methods 🟨 10 undocumented methods  +0 %
JSDocs coverage Properties coverage 🟥 43 undocumented properties 🟥 47 undocumented properties ↑ +9.3 %
Lighthouse Time to Interactive 🟥 14.4 s 🟥 13.7 s ↓ −4.6 %
JSDocs coverage Variables coverage 🟥 273 undocumented variables 🟥 274 undocumented variables ↑ +0.4 %
Code coverage Branch coverage 🟨 89.2 % 🟨 89 % ↓ −0.2 %
Code coverage Function coverage 🟩 94.4 % 🟩 94.4 % ↑ +0.1 %
JSDocs coverage Types coverage 🟥 264 undocumented types 🟥 265 undocumented types ↑ +0.4 %
Code coverage Line coverage 🟩 92.7 % 🟩 92.7 % ↑ +0.1 %
JSDocs coverage Functions coverage 🟥 585 undocumented functions 🟥 584 undocumented functions ↓ −0.2 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,136 KiB 🟩 Total size was 2,143 KiB ↑ +0.3 %
Lighthouse Minimizes main-thread work 🟥 13.9 s 🟥 9.9 s ↓ −28.3 %
Lighthouse JavaScript execution time 🟥 5.5 s 🟥 3.5 s ↓ −36.6 %
Lighthouse Largest Contentful Paint 🟥 11.6 s 🟥 10.7 s ↓ −7.1 %
Lighthouse Uses efficient cache policy on static assets 🟨 31 resources found 🟨 31 resources found ↑ +0.1 %
Lighthouse Metrics 🟩 100% 🟩 100% ↓ −4.6 %
Lighthouse Server Backend Latencies 🟩 1,280 ms 🟩 810 ms ↓ −36.6 %
Lighthouse Max Potential First Input Delay 🟥 1,650 ms 🟥 1,210 ms ↓ −26.6 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 255 KiB 🟥 Potential savings of 256 KiB ↓ −4 %
Lighthouse Network Round Trip Times 🟩 60 ms 🟩 20 ms ↓ −64.4 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 110 KiB 🟥 Potential savings of 110 KiB ↓ −3.2 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 80 KiB 🟥 Potential savings of 79 KiB ↓ −3.2 %
Lighthouse Initial server response time was short 🟩 Root document took 500 ms 🟩 Root document took 500 ms ↓ −0.2 %
JS packages Vulnerabilities for npm dev dependencies. 🟥 81 vulnerabilities (3 critical, 65 high, 10 moderate, 3 low) 🟥 80 vulnerabilities (3 critical, 64 high, 10 moderate, 3 low) ↓ −1.2 %
Lighthouse Avoids an excessive DOM size 🟥 2,360 elements 🟥 2,359 elements ↓ −0.1 %

652 other audits are unchanged.

@BioPhoton BioPhoton marked this pull request as ready for review February 23, 2026 08:53
@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 069d350 with previous commit 4c80af5.

💼 Project utils

🤨 Code PushUp report has both improvements and regressions.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Documentation 🟡 60 🟡 61 ↑ +0.6
Code coverage 🟢 95 🟢 95 ↓ −0.1

4 other categories are unchanged.

👍 1 group improved, 👎 1 group regressed, 👍 5 audits improved, 👎 3 audits regressed

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
JSDocs coverage Documentation coverage 🟡 60 🟡 61 ↑ +0.6
Code coverage Code coverage metrics 🟢 95 🟢 95 ↓ −0.1

13 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
JSDocs coverage Methods coverage 🟨 10 undocumented methods 🟨 10 undocumented methods  +0 %
JSDocs coverage Properties coverage 🟥 40 undocumented properties 🟥 44 undocumented properties ↑ +10 %
Code coverage Branch coverage 🟩 91.8 % 🟩 91.2 % ↓ −0.6 %
JSDocs coverage Types coverage 🟨 55 undocumented types 🟨 56 undocumented types ↑ +1.8 %
JSDocs coverage Variables coverage 🟥 49 undocumented variables 🟥 50 undocumented variables ↑ +2 %
Code coverage Function coverage 🟩 95.8 % 🟩 95.9 % ↑ +0.1 %
JSDocs coverage Functions coverage 🟥 243 undocumented functions 🟥 242 undocumented functions ↓ −0.4 %
Code coverage Line coverage 🟩 97.8 % 🟩 97.8 % ↑ +0.1 %

436 other audits are unchanged.

💼 Project plugin-lighthouse

🤨 Code PushUp report has both improvements and regressions.

🕵️ See full comparison in Code PushUp portal 🔍

All of 6 categories are unchanged.

1 audit changed without impacting score

🗃️ Groups

All of 15 groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Code coverage Branch coverage 🟩 98.8 % 🟩 98.8 % ↓ −0.1 %

443 other audits are unchanged.


12 other projects are unchanged.

BioPhoton and others added 12 commits February 23, 2026 16:16
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
});

it('repacks with invalid entries and logs warning', () => {
it('repacks with without invalid entries and logs warning', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('repacks with without invalid entries and logs warning', () => {
it('repacks without invalid entries and logs warning', () => {

* @param opt.groupId - Group ID for sharding (defaults to generated group ID)
* @param opt.coordinatorIdEnvVar - Environment variable name for storing coordinator ID (defaults to CP_SHARDED_WAL_COORDINATOR_ID)
* @param opt.autoCoordinator - Whether to auto-set the coordinator ID on construction (defaults to true)
* @param opt.measureNameEnvVar - Environment variable name for coordinating groupId across processes (optional)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constructor signature doesn't have a measureNameEnvVar parameter. It is, however, included in tests.

export function extendError(
error: unknown,
message: string,
{ appendMessage = false } = {},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message is prepended, while the cause is appended 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants